/*
 * @Author: your name
 * @Date: 2021-08-25 15:50:49
 * @LastEditTime: 2021-11-20 20:33:05
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \bigdate\src\mock\mock.ts
 */
import { Menu, RoleEnum } from '../router/type'
import { LAYOUT } from '../router/contants'
// 原始格式
export const ROUTER_ARR:Menu[] = [
    //     {
    //         name:'',
    //         icon:'asd',
    //         path:'/',
    //         component:LAYOUT,
    //         disable:true,
    //         mate:{title:'首页'},
    //         redirect:'/index',
    //         id:'1',
    //         preid:null,
    //         children:[
    //             {
    //                 name:'',
    //                 icon:'asd',
    //                 path:'index',
    //                 component: () => import('../views/admin/work/index.vue'),
    //                 disable:true,   
    //                 children:[],
    //                 roles:[RoleEnum.SUPER,RoleEnum.TEST],
    //                 mate:{title:'首页1'},
    //                 hideMenu:false,
    //                 id:'1-1',
    //                 preid:'1' 
    //             }  
    //         ],
    //         roles:[RoleEnum.SUPER,RoleEnum.TEST],
    //         hideMenu:false
    // },
    // {
    //         name:'',
    //         icon:'asd',
    //         path:'about',
    //         component:LAYOUT,
    //         disable:true,
    //         mate:{title:'任务列表'},
    //         redirect:'',
    //         id:'2',
    //         preid:null, 
    //         children:[
    //             {
    //                 name:'',
    //                 icon:'asd',
    //                 path:'index',
    //                 component: () => import('../views/admin/index.vue'),
    //                 disable:true,   
    //                 children:[],
    //                 roles:[RoleEnum.SUPER,RoleEnum.TEST],
    //                 mate:{title:'需求用户'},
    //                 hideMenu:false,
    //                 id:'2-1',
    //                 preid:'2'     
    //             },
    //             {
    //                 name:'',
    //                 icon:'asd',
    //                 path:'ceshi',
    //                 component: () => import('../views/admin/ceshi.vue'),
    //                 disable:true,   
    //                 children:[],
    //                 roles:[RoleEnum.SUPER],
    //                 mate:{title:'首页1'},
    //                 hideMenu:false,
    //                 id:'2-2',
    //                 preid:'2'     
    //             }   
    //         ],
    //         roles:[RoleEnum.SUPER,RoleEnum.TEST],
    //         hideMenu:false
    // }
        
]

/**
 * 注意 1.添加路由格式需要按照链表的格式添加,添加完需要在国际化下注册
 *      2.不管是子路由 还是 父级路由都可设置权限，
 */
// 图表,icon
// 
const COMPONENT_PAGE:Menu[] = [
    {
        name: 'componentsPage',
        icon: 'componentsPage',
        path: '/componentsPage',
        component: LAYOUT,
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER],
        mate: { title: 'componentsPage', router: '/componentsPage' },
        hideMenu: false,
        id: '3',
        preid: null,     
    },
    {
        name:'qrcode',
        icon:'qrcode',
        path:'qrcode',
        component: () => import('../views/admin/componentsPage/qrcode.vue'),
        disable:true,   
        children:[],
        roles:[RoleEnum.SUPER],
        mate:{title:'qrcode',router:'/componentsPage/qrcode'},
        hideMenu:false,
        id:'3-11',
        preid:'3'     
    },
    {
        name: 'verify',
        icon: 'verify',
        path: 'verify',
        component: () => import('../views/admin/componentsPage/verify.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER],
        mate: { title: 'verify', router: '/componentsPage/verify' },
        hideMenu: false,
        id: '3-3',
        preid: '3',     
    },
    
    {
        name: 'inputComp',
        icon: 'inputComp',
        path: 'inputComp',
        component: () => import('../views/admin/componentsPage/inputComp.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER],
        mate: { title: 'inputComp', router: '/componentsPage/inputComp' },
        hideMenu: false,
        id: '3-7',
        preid: '3',     
    }, 
    
    {
        name: 'moveNum',
        icon: 'moveNum',
        path: 'moveNum',
        component: () => import('../views/admin/componentsPage/moveNum.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER],
        mate: { title: 'moveNum', router: '/componentsPage/moveNum' },
        hideMenu: false,
        id: '3-8',
        preid: '3',     
    },
    
    {
        name: 'echartmap',
        icon: 'echartmap',
        path: 'echartmap',
        component: () => import('../views/admin/componentsPage/echartmap.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER],
        mate: { title: 'echartmap', router: '/componentsPage/echartmap' },
        hideMenu: false,
        id: '3-9',
        preid: '3',     
    },

    {
        name: 'wordcloud',
        icon: 'wordcloud',
        path: 'wordcloud',
        component: () => import('../views/admin/componentsPage/wordCloud.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER],
        mate: { title: 'wordcloud', router: '/componentsPage/wordcloud' },
        hideMenu: false,
        id: '3-10',
        preid: '3',     
    },

    {
        name: 'chartsPage',
        icon: 'chartsPage',
        path: 'chartsPage',
        component: () => import('../views/admin/componentsPage/chartsPage.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER],
        mate: { title: 'chartsPage', router: '/componentsPage/chartsPage' },
        hideMenu: false,
        id: '3-1',
        preid: '3',     
    },
    {
        name: 'iconPage',
        icon: 'iconPage',
        path: 'iconPage',
        component: () => import('../views/admin/componentsPage/iconPage.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER],
        mate: { title: 'iconPage', router: '/componentsPage/iconPage' },
        hideMenu: false,
        id: '3-2',
        preid: '3',     
    },
]

// 系统管理
const SYSTEM_LIST:Menu[] = [
    {
        name: 'system',
        icon: 'system',
        path: '/system',
        component: LAYOUT,
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER],
        mate: { title: 'system', router: '/system' },
        hideMenu: false,
        id: '4',
        preid: null,

    },
    {
        name: 'account',
        icon: 'account',
        path: 'account',
        component: () => import('../views/admin/system/account/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'account', router: '/system/account' },
        hideMenu: false,
        id: '4-1',
        preid: '4',     
    },
    {
        name: 'menu',
        icon: 'menu',
        path: 'menu',
        component: () => import('../views/admin/system/menu/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER],
        mate: { title: 'menu', router: '/system/menu' },
        hideMenu: false,
        id: '4-2',
        preid: '4',     
    },
]
// 功能
const FUNCTION_LIST:Menu[] = [
    {
        name: 'functions',
        icon: 'functions',
        path: '/functions',
        component: LAYOUT,
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'functions', router: '/functions' },
        hideMenu: false,
        id: '5',
        preid: null,

    },
    {
        name: 'workbench',
        icon: 'workbench',
        path: 'workbench',
        component: () => import('../views/admin/functionPage/workbench/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'workbench', router: '/functions/workbench' },
        hideMenu: false,
        id: '5-1',
        preid: '5',     
    },
    {
        name: 'copy',
        icon: 'copy',
        path: 'copy',
        component: () => import('../views/admin/functionPage/copy/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'copy', router: '/functions/copy' },
        hideMenu: false,
        id: '5-9',
        preid: '5',     
    },
  
    {
        name: 'lazyload',
        icon: 'lazyload',
        path: 'lazyload',
        component: () => import('../views/admin/functionPage/lazyload/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'lazyload', router: '/functions/lazyload' },
        hideMenu: false,
        id: '5-3',
        preid: '5',     
    },
    {
        name: 'waterRipple',
        icon: 'waterRipple',
        path: 'waterRipple',
        component: () => import('../views/admin/functionPage/waterRipple/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'waterRipple', router: '/functions/waterRipple' },
        hideMenu: false,
        id: '5-4',
        preid: '5',     
    },
    {
        name: 'permission',
        icon: 'permission',
        path: 'permission',
        component: () => import('../views/admin/functionPage/hasPermission/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'permission', router: '/functions/permission' },
        hideMenu: false,
        id: '5-2',
        preid: '5',     
    },
    {
        name: 'watermark',
        icon: 'watermark',
        path: 'watermark',
        component: () => import('../views/admin/functionPage/watermark/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'watermark', router: '/functions/watermark' },
        hideMenu: false,
        id: '5-5',
        preid: '5',     
    },
    {
        name: 'editor',
        icon: 'editor',
        path: 'editor',
        component: () => import('../views/admin/functionPage/editor/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'editor', router: '/functions/editor' },
        hideMenu: false,
        id: '5-6',
        preid: '5',     
    },
    {
        name: 'jsoneditor',
        icon: 'jsoneditor',
        path: 'jsoneditor',
        component: () => import('../views/admin/functionPage/jsoneditor/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'jsoneditor', router: '/functions/jsoneditor' },
        hideMenu: false,
        id: '5-7',
        preid: '5',     
    },
    {
        name: 'markeditor',
        icon: 'markeditor',
        path: 'markeditor',
        component: () => import('../views/admin/functionPage/markeditor/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'markeditor', router: '/functions/markeditor' },
        hideMenu: false,
        id: '5-8',
        preid: '5',     
    }, 
]
export const ARR_ROUTER:Menu[] = [
    {
        name: 'home',
        icon: 'homePage',
        path: '/',
        component: LAYOUT,
        disable: true,
        mate: { title: 'home', router: '/' },
        redirect: '/index',
        id: '1',
        preid: null,
        children: [
        ],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        hideMenu: false,
    },
    {
        name: 'homePage',
        icon: 'homePage',
        path: 'index',
        component: () => import('../views/admin/work/index.vue'),
        disable: true,   
        children: [],
        roles: [RoleEnum.SUPER, RoleEnum.TEST],
        mate: { title: 'homePage', router: '/index' },
        hideMenu: false,
        id: '1-1',
        preid: '1', 
    },
    ...FUNCTION_LIST,
    ...SYSTEM_LIST,
 
    ...COMPONENT_PAGE,
          
]
